Mod_jk version 1.2.27 - How to Download and Install on Mac OS X
Friday the 3rd of September, 2010

    version 1.2.27

      View the most recent changes for the mod_jk port at: mod_jk.darwinports.com/diff
      Scroll down toward the bottom of the page to get installation instructions for mod_jk.
      The raw portfile for mod_jk 1.2.27 is located here:
      http://mod_jk.darwinports.com/dports/www/mod_jk/Portfile
      Find related portfiles with the unique DarwinPorts.com search feature.
      Check for any related Fink projects here: pdb.finkproject.org/pdb/package.php/mod_jk


      The mod_jk Portfile 57375 2009-09-10 08:16:41Z ryandesign macports.org $

      PortSystem 1.0

      Name: mod_jk
      Version: 1.2.27

      Category: www java
      Maintainers: jberry openmaintainer
      Platform: darwin

      Description: Apache mod_jk remote server connector
      Long Description: mod_jk is the connector supported by apache for communication between the apache server and tomcat. mod_jk2, which had for some time superceeded mod_jk, has now become officially 'unsupported' by the Apache group. mod_jk allows apache to be used refer some request for processing by tomcat or any other server that also supports the ajp13 protocol. Apache 2.1 will contain a replacement for mod_jk(2) called mod_proxy_ajp. At this time (this) mod_jk port supports only apache2, not apache 1.x.
      Homepage: http://tomcat.apache.org/connectors-doc/

      distname tomcat-connectors-${version}-src
      Master Sites: http://archive.apache.org/dist/tomcat/tomcat-connectors/jk/source/jk-${version}

      Checksums: md5 a15cc9e3813ef5b081c7de10e6a1fbed sha1 361f8aaa1844ac76a5dda741152968190b34347b rmd160 cb872030d4325ba15d0038c6c7b298213768300a

      depends_build path:apache2/bin/httpd:apache2
      worksrcdir ${distname}/native


      configure.args --with-apxs=${prefix}/apache2/bin/apxs

      # Determine a valid value for javahome
      if { [llength [array get env "JAVA_HOME"]] > 0 } {
      set javahome $env(JAVA_HOME)
      } else {
      set javahome ""
      }
      if { ![file isdirectory ${javahome}] } {
      if { [variant_isset darwin] } {
      if { [file isdirectory "/System/Library/Frameworks/JavaVM.framework/Home"] } {
      set javahome "/System/Library/Frameworks/JavaVM.framework/Home"
      }
      }
      }
      if { ![file isdirectory ${javahome}] } {
      error "This port needs a reasonable value for JAVA_HOME, but couldn't automatically determine one: please set the environment variable."
      }

      Variant: jni description {Build jni_connect.so and enable jni_worker} {
      configure.args-append --with-java-home=${javahome} --enable-jni
      }

      pre-configure {
      # Check to be sure the apache2 port has been updated, and
      # warn the user if it hasn't been.
      # In port versions prior to 2.0.52_1, apxs didn't know where libdir was.
      # That information is needed by the jk configure script.
      set apxs ${prefix}/apache2/bin/apxs
      if { [file executable ${apxs}] } {
      set libdir [exec ${apxs} -q LIBDIR]
      if { 0 == [string length ${libdir}] || ![file isdirectory ${libdir}] } {
      error "Your apache2 installation doesn't know where its library directory is. Please update your apache2 port."
      }
      }
      }

      destroot {
      # Install the connector for apache2
      xinstall -m 755 -d ${destroot}${prefix}/apache2/modules ${destroot}${prefix}/apache2/conf

      xinstall -m 644 ${worksrcpath}/apache-2.0/mod_jk.so ${destroot}${prefix}/apache2/modules

      if {[variant_isset jni]} {
      xinstall -m 644 ${worksrcpath}/jni/jk_jnicb.so ${destroot}${prefix}/apache2/modules
      }

      xinstall -m 644 ${worksrcpath}/../conf/workers.properties.minimal ${destroot}${prefix}/apache2/conf/workers.properties.sample
      }


      post-install {
      ui_msg "#"
      ui_msg "# Example file ${prefix}/apache2/conf/workers.properties.sample has"
      ui_msg "# been installed to illustrate use of the jk connector between "
      ui_msg "# apache2 and tomcat."
      ui_msg "#"
      ui_msg "# You will want to create a working copy of this file as workers.properties"
      ui_msg "# and configure the uri mappings within it, or by using directives within httpd.conf."
      ui_msg "#"
      ui_msg "# Be sure to also add the following line to your httpd.conf:"
      ui_msg "#"
      ui_msg "# LoadModule jk_module modules/mod_jk.so"
      ui_msg "#"
      }


      livecheck.type regex
      livecheck.regex "tomcat-connectors-(\\d+\\.\\d+(\\.\\d+)?)-src.tar.gz"


    If you haven't already installed Darwin Ports, you can find easy instructions for doing so at the main Darwin Ports page.

    Once Darwin Ports has been installed, in a terminal window and while online, type the following and hit return:


      %  cd /opt/local/bin/portslocation/dports/mod_jk
      % sudo port install mod_jk
      Password:
    You will then be prompted for your root password, which you should enter. You may have to wait for a few minutes while the software is retrieved from the network and installed for you. Y ou should see something that looks similar to:

      ---> Fetching mod_jk
      ---> Verifying checksum for mod_jk
      ---> Extracting mod_jk
      ---> Configuring mod_jk
      ---> Building mod_jk with target all
      ---> Staging mod_jk into destroot
      ---> Installing mod_jk
    - Make sure that you do not close the terminal window while Darwin Ports is working. Once the software has been installed, you can find further information about using mod_jk with these commands:
      %  man mod_jk
      % apropos mod_jk
      % which mod_jk
      % locate mod_jk

     Where to find more information:

    Darwin Ports



    Lightbox this page.